#ifndef SYNC_WIN_H
#define SYNC_WIN_H

#include "ui_sync.h"
#include <QDialog>
#include <pthread.h>
#include <QPoint>

class Watcher;

class Sync_win : public QDialog, public Ui::Sync_win
{
    Q_OBJECT

public:
    Sync_win(Watcher *p, int &p_version, bool &p_updated,
             pthread_t id = -1, QDialog *parent = NULL);
    void set_id(pthread_t id);

private slots:
    void on_quit_button_clicked();

private:
    pthread_t id_proc;
    Watcher *gsyncer;
    QPoint dragPosition; //定义一个QPoint的成员变量
    bool &updated;
    int &version;

    void mousePressEvent(QMouseEvent *);        //自定义一个鼠标点击事件函数
    void mouseMoveEvent(QMouseEvent * event);   //实现窗
};

#endif // SYNC_WIN_H
